<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<my-component :num="this.message"></my-component>
		</div>
		<script src="js/vue2.5.js"></script>
		<script>
			var vm = new Vue({
				el:'#app',
				data:{
					message:1
				},
				components:{
					'my-component':{
						props:['num'],
						template:'<div>{{msg}}<button @click="msg++">add</button></div>',
						data(){
							return {
							   msg : this.num	
							}
						}
					}
				}
			})
		</script>
	</body>
</html>
